# # Create your tests here.
import time,hashlib,requests,json
timestamp = str(time.time())[:10]
print(timestamp)
ori_str = timestamp + "ba8a917e-c67a-11ea-9d94-acde48001122"
signature = hashlib.md5(ori_str.encode(encoding='utf-8')).hexdigest()

data={
    "code_env": "3",
    "code_start": "2020-07-31 00:00:00",
    "code_text": "3",
    "code_version": "2",
    "title": "1",
    "transition_id": 2,
    "workflow_id": 1,
    "flag": True
}
resp = requests.get(url="http://127.0.0.1:6060/api/v1.0/tickets/15",
                     headers={
                         "appname":"bybit","timestamp":timestamp,
                         "username":"admin","signature":signature,
                         "Content-Type":"application/json"})
print(resp.json())